package com.bs.tidb.controller;

import com.bs.tidb.po.User;
import com.bs.tidb.service.UserService;
import com.bs.common.utils.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author bingshao
 * @date 2022/10/25
 **/
@RequestMapping("/test")
@RestController
public class TestController {

    @Resource
    private UserService userService;

    @GetMapping("/test")
    public Result<User> test() {
        User user = userService.getById(1);
        return Result.success(user);
    }

}
